-- card: 3928 from stack: in -- bmap block id: 11685 -- flags: 0000 -- background id: 12278 -- name: peekword -- part 3 (button) -- low flags: 00 -- high flags: A003 -- rect: left=362 top=55 right=78 bottom=417 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Demo ----- HyperTalk script ----- on mouseUp put empty into field "data" ask "Peek At " with "411000" if it is empty then exit mouseup show field "data" put it into address put address into field "data" repeat with i=1 to 10 put space & Space & peekword(address,L) after field "data" put last word of field "data" into address end repeat put return & return & "Click Mouse to Exit Demo" after field "data" wait until the mouseclick hide field "data" end mouseUp -- part contents for background part 68 ----- text ----- Peekword returns the unsigned 16-bit integer stored at a given address. This value is represented in hexadecimal, but you may use the HexToDec XFCN provided in this stack to convert the value to a decimal if you wish. A typical useage of peekword would be: put peekword("411000") into temp On the Mac Plus, this would put the value 4CDF into the variable temp. As an option, you may include a second parameter with the peekword XFCN. If peekword detects a second parameter, it returns a 2-line result that consists of the integer stored at the given address in the first line and the next viable address (the original address + 4) in the second line. This option provides a simple and effective way to use peekword in a script to peek into a range of addresses. See the demo on this card for an example. The address provided to peekword must be even or an error will result. -- part contents for background part 69 ----- text ----- 411000 000E 411002 202B 411004 0056 411006 6100 411008 033C 41100A 6000 41100C FE60 41100E 3012 411010 322A 411012 0002 411014 Click Mouse to Exit Demo